<script type="text/javascript" src="${base}/scripts/xsgl/xsdcontent.js"></script>
<form id="xsdglForm" method="post" class="easyui-tabs" fit="true">
<input type="hidden" id="xsd_zgjgId" value="${(gsId)!}"/>
<input type="hidden" id="xsd_zggsId" value="${(zggsId)!}"/>
<input id="xsd_lj_sl" type="hidden" value="${(xsd.lj.sl)!}"/>
<input type="hidden" id="xsd_xsdh" value="${(xsd.xsdh)!}"/>
<input type="hidden" id="xsd_ewmtime" value="${(ewmtime)!}"/>
<input type="hidden" name="xsd.id" value="${(xsd.id)!}"/>
<input id="xsd_orderid" type="hidden" name = "xsd.orderId" value="${(xsd.orderId)!''}"/>
<input type="hidden" id="xsd_ll"/>
<input id="xsd_sbbm_id" name="xsd.sbbm.id"
       value="<#if xsd??>${(xsd.sbbm.id)!}<#else>${(yg.zgjg.id)!}</#if>" type="hidden"/>

<div title="销售信息" style="height: 100%;overflow-y: auto">
    <table style="width:98%" class="tb tab-t">
        <col width="110px"/>
        <col width=""/>
        <col width="110px"/>
        <col width=""/>
        <col width="110px"/>
        <col width=""/>
        <tr style="height: 10px;"></tr>
        <tr id="lj_xsd">
            <th>路&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;径：</th>
            <td colspan="5">
            <#if xsd??>
                <span style="font-weight: bold">
                        <a href="javascript:void(0)" class="ljtip">${(xsd.lj.mc)!}</a>
                    </span>
                <input name="xsd.lj.id" type="hidden" value="${(xsd.lj.id)!}"/>
            <#else>
                <input id="xsd_lj_id" name="xsd.lj.id" type="text" value="${(xsd.lj.id)!}"
                       required="true" class="input-text" missingMessage="路径不能为空！" style="width: 827px"/>
            </#if>
            </td>
        </tr>
        <tr id="xsd_xsht" style="height: 40px;">
            <th>销售合同：</th>
            <td style="font-weight: bold">
            <#if xsd??>
            ${(xsd.xsht.htbm)!}
                <input name="xsd.xsht.id" type="hidden" value="${(xsd.xsht.id)!}"/>
            <#else>
                <input id="xsd_xsht_id" name="xsd.xsht.id" type="text" value="${(xsd.xsht.id)!}" required="true"
                       style="width: 827px" class="input-text"/>
            </#if>
                <input id="xsd_xsfy" type="hidden" value="${(xsd.xsht.xsfy.z)!}"/>
            </td>
        </tr>
        <tr style="height: 40px;">
            <th>销售类型：</th>
            <td>
                <input type="hidden" id="xsd_content_xslx" name="xsd.xslx"
                       value="<#if xsd??>${(xsd.xslx)!}<#else>${(xslx)}</#if>"/>
                <input type="text" class="input-text" id="xsd_xslx_mc"
                       value="<#if xsd??><#if xsd.xslx=='htxs'>合同销售<#elseif xsd.xslx=='zddh'>直达到货<#elseif xsd.xslx=='bgxs'>保供销售<#else>库存零售</#if></#if>"
                       readonly="readonly"/>
            </td>

            <th>客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户：</th>
        <#--<td>-->
        <#--<input id="xsd_kh_id" name="xsd.kh.id" type="text" value="${(xsd.kh.id)!}" required="true"-->
        <#--class="input-text"/>-->
        <#--</td>-->
            <td>
                <input type="hidden" id="kh_id" value="${(xsd.kh.id)!}"/>
                <input type="hidden" id="kh_jc" value="${(xsd.kh.jc)!}"/>
                <input id="xsd_kh_id" name="xsd.kh.id" type="text" value="${(xsd.kh.id)!}" class="input-text"
                       required="true"/>
            </td>
            <td colspan="2" id="xsd_addlskh_Tool" style="display: none;">
                <div style="height:25px;width:150px; ">
                    <a href="#" class="easyui-linkbutton" id="btn_xsd_addlskh"
                       data-options="iconCls:'icon-save2'">新增客户</a>
                </div>
            </td>
            <th>提货仓库：</th>
            <td>
                <input id="xsd_thck_id" name="xsd.thck.id" type="text" value="${(xsd.thck.id)!}"
                       class="input-text"/>
            </td>
        </tr>
        <tr style="height: 40px;">
        <#-- <th>工&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;程：</th>
         <td>
             <input id="xsd_gc_id" name="xsd.gc.id" type="text" value="${(xsd.gc.id)!}" class="input-text"/>
         </td>-->

            <th>开单日期：</th>
            <td>
                <input name="xsd.sxsj" class="easyui-datebox input-text"
                       value="<#if xsd??>${(xsd.sxsj?date)!}<#else>${startDate?date}</#if>"/>
            </td>
            <th>发运责任：</th>
            <td>
                <input id="xsd_fyzr_id" name="xsd.fyzr.id" class="input-text" value="${(xsd.fyzr.id)!}"/>
            </td>
            <th>预定交货时间：</th>
            <td>
                <input id="xsd_jhsj" name="xsd.jhsj" class="easyui-datebox input-text"
                       value="<#if xsd??>${(xsd.jhsj?date)!}<#else>${datetime?date}</#if>"/>
            </td>
        </tr>
        <tr style="height: 40px;">
            <th>计划发货：</th>
            <td>
                <input name="xsd.fhsj" type="text" class="easyui-datebox input-text""
                value="<#if xsd??>${(xsd.fhsj?date)!}<#else>${startDate?date}</#if>"/>
            </td>
            <th>税&nbsp;率(%)：</th>
            <td>
                <input id="xsd_sl" name="xsd.sl" class="easyui-combobox input-text" type="text"
                       value="<#if xsd??>${(xsd.sl?string("0.0000") )!}<#else>17.0000</#if>"
                       data-options="precision:4,min:0,max:100"/>
            </td>

            <th>放货方式：</th>
            <td>
                <input id="xsd_fhfs" name="xsd.fhfs" class="easyui-combobox" value="${(xsd.fhfs)!'self'}"
                       style="width: 167px;" required="true"
                       data-options="valueField: 'label',textField: 'value',data: [{label: 'self',value: '自提'},{label: 'transfer',value: '过户'}]"/>
            </td>
        </tr>
        <tr>
        <#-- <th>发运责任：</th>
         <td>
             <input id="xsd_fyzr_id" name="xsd.fyzr.id" class="input-text" value="${(xsd.fyzr.id)!}"/>
         </td>-->
           <#-- <th>代收费用：</th>
            <td>
                <input name="xsd.dsyfje" type="text" value="${(xsd.dsyfje)!}" class="easyui-numberbox input-text"
                       data-options="precision:4,min:0"/>
            </td>
            <th>提&nbsp;货&nbsp;&nbsp;人：</th>
            <td>
                <input name="xsd.thr" class="input-text" value="${(xsd.thr)!}"/>
            </td>-->
        </tr>
        <tr>
          <#--  <th>预定交货时间：</th>
            <td>
                <input id="xsd_jhsj" name="xsd.jhsj" class="easyui-datebox input-text"
                       value="<#if xsd??>${(xsd.jhsj?date)!}<#else>${datetime?date}</#if>"/>
            </td>-->
        <#-- <th>送货地址：</th>
         <td colspan="3">
             <input id="xsd_jhdz" name="xsd.jhdz" maxlength="50" class="input-text" style="width: 495px"
                    value="${(xsd.jhdz)!}"/>
         </td>-->

        </tr>
        <tr>
          <#--  <th>收&nbsp;货&nbsp;&nbsp;人：</th>
            <td>
                <input name="xsd.shry" type="text" class="input-text" value="${(xsd.shry)!}"/>
            </td>
            <th>联系电话：</th>
            <td>
                <input name="xsd.shrdh" class="input-text" type="text"
                       value="${(xsd.shrdh)!}"/>
            </td>
            <th>交货要求：</th>
            <td>
                <input name="xsd.jhyq" class="input-text" type="text"
                       value="${(xsd.jhyq)!}"/>
            </td>-->
        </tr>
        <tr style="height: 40px;">
            <th>申报公司：</th>
            <td>
                <input id="xsd_sbgs_jc" type="text" class="input-text" readonly="true"
                       value="<#if xsd??>${(xsd.sbgs.jc)!}<#else>${(yg.zggs.jc)!}</#if>"/>
                <input id="xsd_sbgs_id" name="xsd.sbgs.id"
                       value="<#if xsd??>${(xsd.sbgs.id)!}<#else>${(yg.zggs.id)!}</#if>" type="hidden"/>
            </td>

            <th>申&nbsp;报&nbsp;&nbsp;人：</th>
            <td>
                <input type="hidden" id="xsd_sbr_id" name="xsd.sbr.id"
                       value="<#if xsd??>${(xsd.sbr.id)!}<#else>${(yg.id)!}</#if>"/>
                <input id="xsd_sbr_xm" type="text" class="input-text" readonly="readonly"
                       value="<#if xsd??>${(xsd.sbr.xm)!}<#else>${(yg.xm)!}</#if>"/>
            </td>

            <th>销售公司：</th>
            <td>
                <select id="xsd_xsgs_id" name="xsd.xsgs.id" class="easyui-combobox searchinput-text"
                        style="width:166px;"
                        data-options="panelHeight:'150'">
                    <option
                            value="<#if xsd??>${(xsd.xsgs.id)!}<#else>${(yg.zggs.id)!}</#if>"><#if xsd??>${(xsd.xsgs.jc)!}<#else>${(yg.zggs.jc)!}</#if></option>
                <#--<option value="1">淮矿现代物流</option>-->
                </select>
            </td>
        </tr>

        <tr>
            <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
            <td colspan="5">
                <textarea name="xsd.bz" rows="6" cols="45" class="textarea"
                          style="width: 822px">${(xsd.bz)!}</textarea>
            </td>
        </tr>
    </table>
</div>
<div title="销售明细">
    <div id="xsdgl_xsdmx_toolbar">
        <div class="PTools">
            <ul class="niu">
            <#--<li><a name="countprice" href="javascript:void(0);" plain="true">计算价格</a></li>-->
               <#-- <li><a id="exportBindNo" href="javascript:void(0);" class="in" plain="true">导入捆包号</a></li>
                <li><a id="filterMaterial" href="javascript:void(0);" class="in" plain="true">筛选库存物资</a></li>-->
            </ul>
        </div>
    </div>
    <table id="xsd_mx">
    </table>
</div>
<#--<div title="费用明细">
    <div id="xsdgl_xsdfy_toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><a name="xzxsdfy" href="javascript:void(0);" plain="true">新增销售费用</a></li>
                <li><a name="scxsdfy" href="javascript:void(0);" class="del" plain="true">删除销售费用</a></li>
            </ul>
        </div>
    </div>
    <table id="xsd_fy">
    </table>
</div>-->
</form>